Adaptive scan method for image/video coding

ABSTRACT

An adaptive scan method for image/video coding in accordance with the present invention comprises acts of calculating an average power of the transformed coefficients vector and acts rearranging the powers of the transformed coefficients with descending order in the data block according to the power of transformed coefficients; Therefore, the adaptive scan method is dependent on different prediction mode witch has been coded in H.264 standard, and provides better rate-distortion performance in entropy coding to the conventional zig-zag scan.

FIELD OF THE INVENTION

The present invention relates to a scan method for image/video coding, especially to an adaptive scan method for H.264 intra coding.

DESCRIPTION OF THE RELATED ART

A conventional H.264 is a video coding standard better than other video coding standards such as MPEG-2 and MPEG-4 due to the adaptation of advanced coding features, including a spatial prediction in intra coding, a variable block size motion compensation, a 4×4 integer transform, a multiple reference pictures and context-adaptive variable length coding (CAVLC), and an intra coding is one of the key features that contribute to the success of H.264 coding, comprising a 4×4 block intra prediction and a 16×16 block intra prediction.

In the H.264 intra coding, the H.264 conducted in the transform domain intra prediction in a spatial domain, and there are 9 prediction modes for each 4×4 luminance block and 4 prediction modes for each 16×16 luminance block or each 8×8 chrominance block.

With reference to FIG. 1, a well known scan method for the H.264 coding standard is a zig-zag scan.

Generally, a transformed coefficients after a discrete cosine transform (DCT) transform due to spatial redundancy will be statistically decreased from top-left to bottom-right in a two-dimensional coefficients transformed blocks, and the zig-zag scan transfers the two-dimensional transform coefficients into one-dimensional data in descending order and helps to achieve efficient entropy coding. Consequently, if the redundancy is always statistically decreased, the zig-zag scan of the transformed blocks will achieve the best entropy coding performance.

However, in the intra prediction of the H.264 intra coding, the statistical activities of the residuals are changed after the intra prediction of the H.264 intra coding, and the transform coefficients are no longer statistically decreased. In other words, we need to find an adaptive scan method that improves the H.264 intra coding performance other than the conventional zig-zag scan.

SUMMARY OF THE INVENTION

A primary object of the present invention is to provide better scan method with the statistically decreased order of magnitudes of coefficients, especially to the improvement of the coding performance other than the conventional zig-zag scan.

The adaptive scan method for image/video coding in accordance with the present invention comprises acts of calculating an average power of the transformed coefficients vector and acts rearranging the powers of the transformed coefficients with descending order in the n×n block according to the power of transformed coefficients, wherein n=2^(m), and the n and m are positive integers; Therefore, the adaptive scan method is dependent on intra prediction mode which has been coded in H.264 intra coding, and provides better rate-distortion performance in an context-adaptive variable length coding to the conventional zig-zag scan.

BRIEF DESCRIPTIONS OF THE DRAWINGS

The foregoing aspects, as well as many of the attendant advantages and features of this invention will become more apparent by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein:

FIG. 1 is a diagram illustrating zig-zag scan order for 4×4 blocks.

FIG. 2 shows intra-prediction modes defined in H.264.

DETAILED DESCRIPTION OF THE PRESENT INVENTION

An adaptive scan method for image/video coding in accordance with the present invention comprises acts of calculating an average power of the transformed coefficients vector and acts rearranging the powers of the transformed coefficients with descending order in the n×n block, wherein n=2^(m), and the n and m are positive integers, and the n×n block may be a 4×4 block, according to the power of transformed coefficients.

The acts of calculating an average power of the transformed coefficients vector, and the calculation of the average power of the transformed coefficients vector further comprises acts of modeling a spatial data and acts of modeling a predictive data.

With reference to FIG. 2, according to the conventional H.264 intra coding of a 4×4 block, the procedure of the H.264 intra coding comprises: a coding block (X) is first performed intra prediction to obtained the a residual block (Z), and;

the residual block (Z) is integer discrete cosine transform (DCT) and post scaling transformed to get a transform block (Y).

Therefore, the acts of calculating the average power of the transformed coefficients vector in accordance with the present invention. The average power of transformed coefficients vector, wherein a transformed coefficients vector (y) is obtained from the transform block (Y).

According to the intra prediction defined in H.264 intra coding, the residual block Z is expressed as, Z=X−{tilde over (X)} ^(J) wherein {tilde over (X)}^(J) denotes the prediction block for Mode J, where J=0, 1, 2, . . . , 8. The residual block Z is transformed by integer transform and post-scaling, and then quantized.

Since the transform block (Y) is obtained from the residual block (Z), therefore, the transformed block (Y) is Y=(HZH ^(T))·*S _(f), where H is the integer transform defined in H.264 standard and given as

$H = \begin{bmatrix} 1 & 1 & 1 & 1 \\ 2 & 1 & {- 1} & {- 2} \\ 1 & {- 1} & {- 1} & 1 \\ 1 & {- 2} & 2 & {- 1} \end{bmatrix}$ and S_(f) is the post-scaling factor matrix depicted as

$S_{f} = \begin{bmatrix} 0.2500 & 0.1581 & 0.2500 & 0.1581 \\ 0.1581 & 0.1000 & 0.1581 & 0.1000 \\ 0.2500 & 0.1581 & 0.2500 & 0.1581 \\ 0.1581 & 0.1000 & 0.1581 & 0.1000 \end{bmatrix}$ and the superscript “^(T)” represents the transpose of the matrix and the operator, “.*”, denotes the element-by-element multiplication in their corresponding indices.

When the transformed block (Y) is give and transferring the transformed block (Y) into a transformed coefficient vector (y) by vec(Y)=(H _(K) ·vec(Z))·*vec(S _(f)). Where the function vec(Y) and vec(S_(f)) denotes a 16×1 column vector, which is a concatenation of row-ordered vectors of the argument matrix, for example: vec(Z)=(z _(1,1) , z _(1,2) , z _(1,3) , z _(1,4) , z _(2,1) , z _(2,2) , . . . , z _(4,3) , z _(4,4))^(T) and the transform matrix H_(K) with dimension 16×16 is defined as H_(K)=H

H, where the operator “

” represents Kronecker product.

For simplifying the notations, where y=vec(Y), and the transformed coefficient vector (y) can be expressed by y=(H_(K)·z)·*s_(f).

Therefore, the average power of the k-th transformed coefficient vector y can be statistically expressed by

${\phi_{y}(k)} = {{E\left\lbrack {y^{2}(k)} \right\rbrack} = {\sum\limits_{m = 1}^{16}{\sum\limits_{n = 1}^{16}{{H_{K}\left( {k,m} \right)}{{H_{K}\left( {k,n} \right)} \cdot {E\left\lbrack {{z(m)}{z(n)}} \right\rbrack} \cdot {{s_{f}^{2}(k)}.}}}}}}$

Accordingly to the average power of the k-th transformed coefficient vector (y) above-mentioned, a autocorrelation function z(n)

$\begin{matrix} {{E\left\lbrack {{z(m)}{z(n)}} \right\rbrack} = {E\left\lbrack {\left( {{x(m)} - {{\overset{\sim}{x}}^{J}(m)}} \right) \cdot \left( {{x(n)} - {{\overset{\sim}{x}}^{J}(n)}} \right)} \right\rbrack}} \\ {= {{E\left\lbrack {{x(m)}{x(n)}} \right\rbrack} - {E\left\lbrack {{x(m)}{{\overset{\sim}{x}}^{J}(n)}} \right\rbrack} - {E\left\lbrack {{{\overset{\sim}{x}}^{J}(m)}{x(n)}} \right\rbrack} + {E\left\lbrack {{{\overset{\sim}{x}}^{J}(m)}{{\overset{\sim}{x}}^{J}(n)}} \right\rbrack}}} \end{matrix}$

and {tilde over (x)}^(J)(m) denotes the m^(th) element of {tilde over (x)}^(J) since the other parameters H_(K)(k, m) and s_(f)(k) are known, and build a statistical model of x that compute all correlation functions. E[x(m)x(n)],E[x(m){tilde over (x)}^(J)(n)],E[{tilde over (x)}^(J)(m)x(n)], and E[{tilde over (x)}^(J)(m){tilde over (x)}^(J)(n)] before compute the autocorrelation function of z(n).

The correlation functions are position-dependent to avoid physical spatial position of each index m. The left-top pixel of the current block X positioned at (0, 0) and the corresponding spatial positions related to all m indices are depicted as: m=1→(0,0);m=2→(0,1);m=3→(0,2);m=4→(0,3); m=5→(1,0);m=6→(1,1);m=7→(1,2);m=8→(1,3); m=9→(2,0);m=10→(2,1);m=11→(2,2);m=12→(2,3); m=13→(3,0);m=14→(3,1);m=15→(3,2);m=16→(3,3);

the positions of surrounding coded pixel in the upper and left blocks used for prediction are stated as A→(−1,0);B→(−1,1);C→(−1,2);D→(−1,3); E→(−1,4);F→(−1,5);G→(−1,6);H→(−1,7); I→(0,−1);J→(1,−1);K→(2,−1);L→(3,−1); M→(−1,−1);

p(m) for m=1, 2, . . . , 16, to represent the spatial position of the m^(th) element. For example, p(1)=(0, 0), p(2)=(0, 1), . . . , p(16)=(3, 3). Consequently, we will use p(a) for a=A, B, . . . , M to represent the position of the surrounding coded pixel such as p(A)=(−1, 0), p(B)=(−1, 1), . . . , p(M)=(−1, −1).

The acts of modeling a spatial data is to solve the E[x(m)x(n)].

Considering the covariance of pixels x(m) and x(n), which is defined as Cov[x(m),x(n)]=E└(x(m)−μ_(X(m)))·(x(n)−μ_(X(n)))┘=E[x(m)x(n)]−μ_(X(m))μ_(X(n)),

and an assumption that the pixel values in a coding block arranged in the row order form a stationary random vector, i.e., x=(x(1), x(2), □, x(16))^(T), it is well-known that μ_(X)=E[x(m)], therefore, E[x(m)x(n)]=Cov[x(m),x(n)]+μ_(X) ².

For a stationary random vector, σ_(X) ²=Cov[x(m), x(m)] for all m. Based on the 1-D first-order Markov model: Cov[X(j,i),X(j,i+s)]=σ_(X) ²ρ_(x) ^(s), and; Cov[X(j,i),X(j+t,i)]=σ_(X) ²ρ_(y) ^(t);

where σ_(X) and ρ_(y) ^(t) denote the horizontal and vertical correlation coefficients with one-pixel displacement, respectively. In this embodiment, we simplify the 2-D first-order Markov model as Cov[X(j,i),X(j+t,i+s)]=σ_(X) ²·ρ_(y) ^(t)·ρ_(x) ^(s). Hence, the covariance function in (16) generally can be expressed as σ_(X) ²(m,n)=Cov[x(m),x(n)]=σ_(X) ²ρ_(x) ^(|p) ^(x) ^((m)−p) ^(x) ^((n)|)ρ_(y) ^(|p) ^(y) ^((m)−p) ^(y) ^((n)|),

where p_(x)(m) and p_(y)(m) represent the horizontal and vertical elements of spatial position vector, p(m) respectively. Thus, the 16×16 covariance matrix finally can be expressed by

$K_{X} = {{\sigma_{X}^{2}\begin{bmatrix} 1 & \rho_{y} & \rho_{y}^{2} & \rho_{y}^{3} \\ \rho_{y} & 1 & \rho_{y} & \rho_{y}^{2} \\ \rho_{y}^{2} & \rho_{y} & 1 & \rho_{y} \\ \rho_{y}^{3} & \rho_{y}^{2} & \rho_{y} & 1 \end{bmatrix}} \otimes \begin{bmatrix} 1 & \rho_{x} & \rho_{x}^{2} & \rho_{x}^{3} \\ \rho_{x} & 1 & \rho_{x} & \rho_{x}^{2} \\ \rho_{x}^{2} & \rho_{x} & 1 & \rho_{x} \\ \rho_{x}^{3} & \rho_{x}^{2} & \rho_{x} & 1 \end{bmatrix}}$

the K_(x), the computation of E[x(m)x(n)] becomes straightforward, and E[x(m)x(n)]=Cov[x(m),x(n)]+μ_(X) ²=σ_(X) ²ρ_(x) ^(|p) ^(x) ^((m)−p) ^(x) ^((n)|)ρ_(y) ^(|p) ^(y) ^((m)−p) ^(y) ^((n)|)+μ_(X) ².

The acts of modeling a predictive data is to solve E[x(m){tilde over (x)}^(J)(n)], E[{tilde over (x)}^(J)(m)x(n)], and E[{tilde over (x)}^(J)(m){tilde over (x)}^(J)(n)].

For Mode J in the predictive data, {tilde over (x)}^(J)(m) can be generally expressed by a linear combination of one, two, or three decoded values from A, B, . . . , and M in the left and the upper blocks as

${{{\overset{\sim}{x}}^{J}(m)} = {\sum\limits_{{all}\mspace{14mu} a_{m}^{J}}{w_{a_{m}^{J}}{\hat{x}\left( {p\left( a_{m}^{J} \right)} \right)}}}},{a_{m}^{J} \in \left\{ {{A,B},\ldots\mspace{14mu},M} \right\}}$

wherein p(a_(m) ^(J)) denotes the position of a_(m) ^(J), which is one of A, B, . . . , and M, used in the prediction and w_(J) is a weighting factor, which is defined in H.264, for referred position p(a_(m) ^(J)) to predict x(m). It is noted that x^(p(a_(m) ^(J))) denotes the reconstructed pixel at the position p(a_(m) ^(J)) and using the first order Markov model to analyze the predictive data, the physical displacement of the positions of the predicted pixel and the target pixel is very important. The reconstructed pixels used for intra prediction can be modeled as {circumflex over (x)}(p(a _(m) ^(J)))=x(p(a _(m) ^(J)))+e(p(a _(m) ^(J))),

where e(p(a_(m) ^(J))) denotes the quantization error in the spatial domain at position p(a_(m) ^(J)). Assume that the quantization error is a zero mean Gaussian process and independent of spatial data such that E[x(m)e(p(a _(n) ^(J)))]=E[x(m)]·E[e(p(a _(n) ^(J)))]=0 and

${E\left\lbrack {{e\left( {p\left( a_{m}^{J} \right)} \right)}{e\left( {p\left( a_{n}^{J} \right)} \right)}} \right\rbrack} = \left\{ {\begin{matrix} {{\sigma_{e}^{2}(m)},} & {{{if}\mspace{14mu} a_{m}^{J}} = a_{n}^{J}} \\ {0,} & {{{if}\mspace{14mu} a_{m}^{J}} \neq a_{n}^{J}} \end{matrix}.} \right.$

It is noted that the quantization error e(p(a_(m) ^(J))) is produced from the quantization of transformed coefficient by using quantization step (Qstep). The analysis of e(p(a_(m) ^(J))) should be further addressed such that we can statistically estimate the noise power σ_(e) ² precisely.

the intra-prediction residual is Z=X−{tilde over (X)} and the reconstruction block is given by {circumflex over (X)}=Z _(q) +{tilde over (X)}.

The reconstruction error e(p(a_(m) ^(J))) is equal to the quantization error of residual, that is, e(p(a _(m) ^(J)))=z _(q)(p(a _(m) ^(J)))−z(p(a _(m) ^(J)))

which is contributed by the quantization of transformed coefficients as e _(y)(k)=y _(q)(k)−y(k), k=1, 2, . . . , 16.

And reconstruct residual block as z _(q) =vec(Z _(q))=G _(K)·(vec(Y _(q))·*vec(S _(i))) where the inverse 2-D transform matrix G_(K) is Kronecker product of G as G_(K)=G

G, where

$G = {\begin{bmatrix} 1 & 1 & 1 & {1\text{/}2} \\ 1 & {1\text{/}2} & {- 1} & {- 1} \\ 1 & {{- 1}\text{/}2} & {- 1} & 1 \\ 1 & {- 1} & 2 & {{- 1}\text{/}2} \end{bmatrix}.}$

To simplify the representation, we combine the scaling factor S_(i) into inverse transform matrix G_(K) z _(q) =vec(Z _(q))=G _(KS) ·y _(q)

Thus, the reconstructed residual for the m^(th) element becomes

$\begin{matrix} {{z_{q}(m)} = {\sum\limits_{k = 1}^{16}{{G_{KS}\left( {m,k} \right)}{y_{q}(k)}}}} \\ {{{and}\mspace{14mu} y} = \left( {H_{KS} \cdot z} \right)} \end{matrix}$ and combining scaling factor S_(f) into transformation matrix G_(K).

Since G_(KS)=H_(KS) ^(T), the power of the quantization error in spatial domain can be expressed by

$\begin{matrix} {{E\left\lbrack {{\mathbb{e}}^{2}(m)} \right\rbrack} = {{E\left\lfloor \left( {{\hat{x}(m)} - {x(m)}} \right)^{2} \right\rfloor} = {E\left\lfloor \left( {{z_{q}(m)} - {z(m)}} \right)^{2} \right\rfloor}}} \\ {= {E\left\lbrack \left( {\sum\limits_{k = 1}^{16}{{G_{KS}\left( {m,k} \right)}\left( {{y_{q}(k)} - {y(k)}} \right)}} \right)^{2} \right\rbrack}} \\ {= {E\left\lbrack \left( {\sum\limits_{k = 1}^{16}{{H_{KS}\left( {k.m} \right)}\left( {{y_{q}(k)} - {y(k)}} \right)}} \right)^{2} \right\rbrack}} \\ {= {E\left\lbrack \left( {\sum\limits_{k = 1}^{16}{{H_{KS}\left( {k,m} \right)}{e_{y}(k)}}} \right)^{2} \right\rbrack}} \\ {= {E\left\lbrack {\sum\limits_{k = 1}^{16}{{H_{KS}\left( {k,m} \right)}{{e_{y}(k)} \cdot {\sum\limits_{l = 1}^{16}{{H_{KS}\left( {l,m} \right)}{e_{y}(l)}}}}}} \right\rbrack}} \\ {= {\sum\limits_{k = 1}^{16}{\sum\limits_{l = 1}^{16}{{H_{KS}\left( {k,m} \right)}{H_{KS}\left( {l,m} \right)}{{E\left\lbrack {{e_{y}(k)}{e_{y}(l)}} \right\rbrack}.}}}}} \end{matrix}$

Assume that the quantization errors in different frequency positions are independent as E└e _(y)(k)e _(y)(l)┘=E└e _(y)(k)┘E└e _(y)(l)┘=0, for k≠l. Therefore,

${E\left\lbrack {{\mathbb{e}}^{2}(m)} \right\rbrack} = {\sum\limits_{k = 1}^{16}{{H_{KS}^{2}\left( {k,m} \right)}{{E\left\lbrack {e_{y}^{2}(k)} \right\rbrack}.}}}$

Thus, the relationship of quantization errors in spatial domain and in frequency domain could be precisely estimated. Since it is a uniform quantization for coefficient quantization in H.264, the mean square quantization error is

${E\left\lbrack {e_{y}^{2}(k)} \right\rbrack} = \frac{{Qstep}^{2}}{12}$ wherein Q_(step) is the quantization step size.

and, the quantization noise power is

$\begin{matrix} {{{\sigma_{e}^{2}(m)} = {\sum\limits_{k = 1}^{16}{{H_{KS}^{2}\left( {k,m} \right)} \cdot \frac{{Qstep}^{2}}{12}}}},{and}} \\ {{E\left\lbrack {{x(m)}{{\overset{\sim}{x}}^{J}(n)}} \right\rbrack} = {E\left\lbrack {{x(m)} \cdot \left( {{\sum\limits_{a_{n}^{J}}{w_{a_{n}^{J}}{x\left( {p\left( a_{n}^{J} \right)} \right)}}} + {w_{a_{n}^{j}}{e\left( {p\left( a_{n}^{J} \right)} \right)}}} \right)} \right\rbrack}} \\ {= {E\left\lbrack {{x(m)} \cdot {\sum\limits_{a_{n}^{J}}{w_{a_{n}^{J}}{x\left( {p\left( a_{n}^{J} \right)} \right)}}}} \right\rbrack}} \\ {= {\sum\limits_{a_{n}^{J}}{w_{a_{n}^{J}}{E\left\lbrack {{x(m)}{x\left( {p\left( a_{n}^{J} \right)} \right)}} \right\rbrack}}}} \\ {= {\sum\limits_{a_{n}^{J}}{{w_{a_{n}^{J}}\left( {{\sigma_{x}^{2}{\rho_{x}}^{{{p_{x}{(m)}} - {p_{x}{(a_{n}^{J})}}}}\rho_{y}^{{{p_{y}{(m)}} - {p_{y}{(a_{n}^{J})}}}}} + \mu_{X}^{2}} \right)}.}}} \end{matrix}$

Since the quantization noise e(p(a_(n) ^(J))) is independent of spatial data x(m), we can directly let E[x(m)e(p(a_(n) ^(J))]=0. By using spatial data modeling E[{tilde over (x)}^(J)(m)x(n)], which is written as

${E\left\lbrack {{{\overset{\sim}{x}}^{J}(m)}{x(n)}} \right\rbrack} = {\sum\limits_{a_{m}^{j}}{{w_{a_{m}^{J}}\left( {{\sigma_{X}^{2}\rho_{x}^{{{p_{x}{(a_{m}^{J})}} - {p_{x}{(n)}}}}\rho_{y}^{{{p_{y}{(a_{m}^{J})}} - {p_{y}{(n)}}}}} + \mu_{X}^{2}} \right)}.}}$

Finally, we can use the spatial data model and noise model to compute E[{tilde over (x)}^(J)(m){tilde over (x)}^(J)(n)] as

$\begin{matrix} {{E\left\lbrack {{{\overset{\sim}{x}}^{J}(m)}{{\overset{\sim}{x}}^{J}(n)}} \right\rbrack} = {E\left\lbrack \left( {\sum\limits_{a_{m}^{J}}{w_{a_{m}^{J}}\left( {{x\left( {{p\left( a_{m}^{J} \right)} + {e\left( {p\left( a_{m}^{J} \right)} \right)}} \right)} \cdot} \right.}} \right. \right.}} \\ {\left( {\sum\limits_{a_{n}^{J}}{w_{a_{n}^{J}}\left( {x\left( {{p\left( a_{n}^{J} \right)} + {e\left( {p\left( a_{n}^{J} \right)} \right)}} \right\rbrack} \right.}} \right.} \\ {= {E\left\lbrack {{\sum\limits_{a_{m}^{J}}{\sum\limits_{a_{n}^{J}}{w_{a_{m}^{J}}w_{a_{n}^{J}}{x\left( {p\left( a_{m}^{J} \right)} \right)}{x\left( {p\left( a_{n}^{J} \right)} \right)}}}} +} \right.}} \\ \left. {\sum\limits_{a_{m}^{J}}{\sum\limits_{a_{n}^{J}}{w_{a_{m}^{J}}w_{a_{n}^{J}}{e\left( {p\left( a_{m}^{J} \right)} \right)}{e\left( {p\left( a_{n}^{J} \right)} \right)}}}} \right\rbrack \\ {= {{\sum\limits_{a_{m}^{J}}{\sum\limits_{a_{n}^{J}}{w_{a_{m}^{J}}{w_{a_{n}^{J}}\left( {{\sigma_{X}^{2}\rho_{x}^{{{p_{x}{(a_{m}^{J})}} - {p_{x}{(a_{n}^{J})}}}}\rho_{y}^{{{p_{y}{(a_{m}^{J})}} - {p_{y}{(a_{n}^{J})}}}}} + \mu_{X}^{2}} \right)}}}} +}} \\ {{\sum\limits_{a_{m}^{J}}{\sum\limits_{a_{n}^{J}}{\left( w_{a_{m}^{J}} \right)^{2}{\delta\left( {a_{m}^{J} - a_{n}^{J}} \right)}{\sigma_{e}^{2}\left( {p\left( a_{m}^{J} \right)} \right)}}}},} \end{matrix}$ where δ(α−β)=1 if α=β and δ(α−β)=0 if α≠β.

the autocorrelation function of the residual data finally can be expressed by

$\begin{matrix} {{E\left\lbrack {{z(m)}{z(n)}} \right\rbrack} = {\left( {{\sigma_{X}^{2}{R_{X}\left( {m,n} \right)}} + \mu_{X}^{2}} \right) - {\sum\limits_{a_{n}^{J}}{w_{a_{n}^{J}}\left( {{\sigma_{X}^{2}{r_{X}\left( {m,a_{n}^{J}} \right)}} + \mu_{X}^{2}} \right)}} -}} \\ {{\sum\limits_{a_{m}^{J}}{w_{a_{m}^{J}}\left( {{\sigma_{X}^{2}{r_{X}\left( {a_{m}^{J},n} \right)}} + \mu_{X}^{2}} \right)}} +} \\ {{\sum\limits_{a_{m}^{J}}{\sum\limits_{a_{n}^{J}}{w_{a_{m}^{J}}{w_{a_{n}^{j}}\left( {{\sigma_{X}^{2}{r_{X}\left( {a_{m}^{J},a_{n}^{J}} \right)}} + \mu_{X}^{2}} \right)}}}} +} \\ {{\sum\limits_{a_{m}^{J}}{\sum\limits_{a_{n}^{J}}{\left( w_{a_{m}^{J}} \right)^{2}{\delta\left( {a_{m}^{J} - a_{n}^{J}} \right)}{\sigma_{e}^{2}\left( {p\left( a_{m}^{J} \right)} \right)}}}},} \end{matrix}$ where the correlation coefficient r_(X)(m,n) is defined as r _(X)(m,n)≡ρ_(x) ^(|p) ^(x) ^((m)−p) ^(x) ^((n)|)ρ_(y) ^(|p) ^(y) ^((m)−p) ^(y) ^((n)|).

The acts of rearranging the powers of the transformed coefficients with descending order in the 4×4 block according to the power of transformed coefficients comprising:

-   -   given the values of Qstep, μ_(X), σ² _(X), ρ_(x) and ρ_(y);     -   use Qstep, μ_(X), σ² _(X), ρ_(x) and ρ_(y) to compute the         φ_(y)(k)=E[y²(k)], and;     -   according to the calculation results of the φ_(y)(k)=E[y²(k)],         derive a scan order for coefficients in descending order.

An embodiment of a scan order for mode 0 of the adaptive scan method for H.264 intra coding in accordance with the present invention.

For example, based on the acts of above-mentioned, if we give the values of Qstep=26, μ_(X)=123, σ² _(X=)470, ρ_(x)=0.6 and ρ_(y)=0.9, and through these parameters to calculate the averaged powers of transformed coefficients, and results are listed in a table below.

Average Mode power 0 E[y2(1)] 1710.4 E[y2(2)] 789.2 E[y2(3)] 506.3 E[y2(4)] 403.9 E[y2(5)] 343.7 E[y2(6)] 130.5 E[y2(7)] 65.0 E[y2(8)] 41.3 E[y2(9)] 119.3 E[y2(10)] 44.2 E[y2(11)] 22.0 E[y2(12)] 14.0 E[y2(13)] 69.2 E[y2(14)] 26.3 E[y2(15)] 13.1 E[y2(16)] 8.3

Furthermore, according to the results of the averaged powers of transformed coefficients, rearrange the scan order for mode 0 in each 4×4 blocks, and the scan order is

$\quad\begin{matrix} 1 & 2 & 3 & 4 \\ 5 & 6 & 9 & 11 \\ 7 & 10 & 13 & 14 \\ 8 & 12 & 15 & 16 \end{matrix}$

It is noted that the adaptive scan method of the present invention need not to waste bits to signal the scan order for each 4×4 block, because the scan order is dependent on intra prediction mode which has been coded in H.264 intra coding. Furthermore, the proposed method can also be exploited to replace the traditional zig-zag scan proposed in other standard once they take the advantage of adaptive predictions.

While the present invention has been particularly shown and described with reference to the preferred embodiments thereof, these are merely examples to help clarify the invention and are not intended to limit the invention. It will be understood by those skilled in the art that various changes, modifications, and alterations in form and details may be made therein without departing from the spirit and scope of the invention, as set forth in the following claims. 

1. An adaptive scan method for image/video coding in accordance with the present invention comprising steps of calculating an average power of the transformed coefficients vector and rearranging the powers of the transformed coefficients in descending order in a n×n block of an image according to the power of transformed coefficients, wherein n=2^(m), and the n and m are positive integers; the step of calculating an average power of the transformed coefficients vector comprising: a step of modeling spatial data; and a step of modeling predictive data; the step of rearranging the powers of the transformed coefficients in descending order in the n×n block of the image comprising computing the average power of the transformed coefficients vector; and according to the calculation results of the average power of the transformed coefficients vector, deriving a scan order for the coefficients in descending order.
 2. The adaptive scan method for image/video coding as claimed in claim 1, the step modeling spatial data being based on a 1-D first-order Markov model, a 2-D first-order Markov model and a denoted quantization error of a zero mean Gaussian process.
 3. An adaptive scan method for image/video coding comprising steps of dividing an image into image blocks; generating a predicted image block for each image block using intra prediction; transforming a residual block, the residual block being an image block from which the corresponding predicted image block has been subtracted, into a transformed coefficient vector by using an integer discrete cosine transform and a post scaling operation; generating an average power value for each transformed coefficient vector based on a 2-D first order Markov model; sorting the average power values in descending order; and deriving a scan order for each image block according to the descending order of the average power values.
 4. The adaptive scan method for image/video coding as recited in claim 3, wherein each image block being encoded for intra-prediction mode 0 of H.264/AVC comprises sixteen pixels arranged sequentially in four rows of four pixels each and the pixels are scanned sequentially with the pixels in the first row scanned first, then the first two pixels in the second row, the first pixel in the third row, the first pixel in the fourth row, the third pixel in the second row, the second pixel in the third row, the fourth pixel in the second row, the second pixel in the fourth row, the third pixel in the third row, the fourth pixel in the third row, the third pixel in the fourth row and the fourth pixel in the fourth row. 